Repository navigation
Fix assignment safety, roster parsing, and Ralph authority - #2156
Conversation
Closes #2079 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 5 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 1 active Copilot thread(s) resolved (2 outdated skipped) |
| ✅ | CI passing | All checks passing |
Files Changed (29 files, +1406 −870)
| File | +/− |
|---|---|
.changeset/2079-team-roster-table-scope.md |
+5 −0 |
.changeset/assignment-safety-attribution.md |
+6 −0 |
.changeset/tidy-ralph-guidance.md |
+6 −0 |
.github/workflows/squad-heartbeat.yml |
+21 −74 |
.github/workflows/squad-issue-assign.yml |
+87 −57 |
.github/workflows/squad-triage.yml |
+20 −16 |
.squad-templates/ralph-reference.md |
+31 −25 |
.squad-templates/workflows/squad-heartbeat.yml |
+21 −71 |
.squad-templates/workflows/squad-issue-assign.yml |
+86 −56 |
.squad-templates/workflows/squad-triage.yml |
+20 −16 |
.squad/templates/ralph-reference.md |
+31 −25 |
docs/src/content/docs/features/copilot-coding-agent.md |
+29 −17 |
packages/squad-cli/templates/ralph-reference.md |
+31 −25 |
packages/squad-cli/templates/workflows/squad-heartbeat.yml |
+21 −71 |
packages/squad-cli/templates/workflows/squad-issue-assign.yml |
+86 −56 |
packages/squad-cli/templates/workflows/squad-triage.yml |
+20 −16 |
packages/squad-sdk/src/config/markdown-migration.ts |
+17 −3 |
packages/squad-sdk/templates/ralph-reference.md |
+31 −25 |
packages/squad-sdk/templates/workflows/squad-heartbeat.yml |
+21 −71 |
packages/squad-sdk/templates/workflows/squad-issue-assign.yml |
+86 −56 |
packages/squad-sdk/templates/workflows/squad-triage.yml |
+20 −16 |
templates/ralph-reference.md |
+31 −25 |
templates/workflows/squad-heartbeat.yml |
+21 −71 |
templates/workflows/squad-issue-assign.yml |
+86 −56 |
templates/workflows/squad-triage.yml |
+20 −16 |
test/assignment-safety-attribution.test.ts |
+372 −0 |
test/cli/health-command.test.ts |
+79 −6 |
test/migration.test.ts |
+46 −0 |
test/ralph-reference-authority.test.ts |
+55 −0 |
Total: +1406 −870
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
|
🟠 Impact Analysis — PR #2156Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (3 files)
docs (1 file)
root (7 files)
squad-cli (4 files)
squad-sdk (5 files)
squad-state (1 file)
templates (4 files)
tests (4 files)
This report is generated automatically for every PR. See #733 for details. |
🔒 Security Review
🔒 Security review: 1 warning(s), 2 info.
Automated security review — informational only. |
🏗️ Architectural Review
Automated architectural review — informational only. |
There was a problem hiding this comment.
🟡 Changes recommended
Automated assignment and roster compatibility regressions remain unresolved.
3 open findings
What changed in this PR
Improves Squad’s assignment safety, roster accuracy, and role guidance across active workflows, the SDK, and distributed templates.
Changes:
- Consolidates workflow assignment checks and discloses deterministic triage provenance without redesigning routing.
- Restricts roster parsing and adds parser, health, and workflow regressions.
- Clarifies Ralph’s monitoring role and human merge authority, with synchronized templates and changesets.
| File | Description |
|---|---|
test/ralph-reference-authority.test.ts |
Checks authority guidance and template synchronization. |
test/migration.test.ts |
Tests exclusion of auxiliary tables. |
test/cli/health-command.test.ts |
Updates mocks and roster-count regressions. |
test/assignment-safety-attribution.test.ts |
Tests assignment checks, provenance, and workflow mirrors. |
templates/workflows/squad-triage.yml |
Mirrors provenance and assignment delegation changes. |
templates/workflows/squad-issue-assign.yml |
Mirrors token and response checks. |
templates/workflows/squad-heartbeat.yml |
Removes competing assignment logic. |
templates/ralph-reference.md |
Mirrors monitoring and merge-authority guidance. |
packages/squad-sdk/templates/workflows/squad-triage.yml |
Ships updated triage behavior. |
packages/squad-sdk/templates/workflows/squad-issue-assign.yml |
Ships assignment safety checks. |
packages/squad-sdk/templates/workflows/squad-heartbeat.yml |
Removes SDK template’s competing assignment path. |
packages/squad-sdk/templates/ralph-reference.md |
Ships clarified authority guidance. |
packages/squad-sdk/src/config/markdown-migration.ts |
Limits table parsing to roster sections. |
packages/squad-cli/templates/workflows/squad-triage.yml |
Ships updated triage behavior. |
packages/squad-cli/templates/workflows/squad-issue-assign.yml |
Ships assignment safety checks. |
packages/squad-cli/templates/workflows/squad-heartbeat.yml |
Removes CLI template’s competing assignment path. |
packages/squad-cli/templates/ralph-reference.md |
Ships clarified authority guidance. |
docs/src/content/docs/features/copilot-coding-agent.md |
Explains assignment verification and triage provenance. |
.squad/templates/ralph-reference.md |
Updates installed authority guidance. |
.squad-templates/workflows/squad-triage.yml |
Updates canonical provenance and removes direct assignment. |
.squad-templates/workflows/squad-issue-assign.yml |
Adds canonical token and response validation. |
.squad-templates/workflows/squad-heartbeat.yml |
Removes canonical heartbeat assignment logic. |
.squad-templates/ralph-reference.md |
Defines canonical monitoring and human-merge guidance. |
.github/workflows/squad-triage.yml |
Updates active triage provenance and delegation. |
.github/workflows/squad-issue-assign.yml |
Adds active assignment checks and relocates label repair. |
.github/workflows/squad-heartbeat.yml |
Removes active heartbeat assignment logic. |
.changeset/tidy-ralph-guidance.md |
Records template guidance release notes. |
.changeset/assignment-safety-attribution.md |
Records assignment and provenance release notes. |
.changeset/2079-team-roster-table-scope.md |
Records SDK parser release notes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

What
This PR makes
squad-issue-assign.ymlthe sole Copilot assignment authority and fails visibly when its required token or assignment confirmation is missing. It also limits team roster parsing to supported roster sections and corrects Ralph's monitor-only merge-authority guidance. For #2085, it addresses only the misleading attribution of deterministic triage as Lead-agent analysis; it does not change routing policy or fully resolve that issue.Why
Resolves #2080, #2079, and #2077. Partially addresses #2085 by making triage provenance explicit; #2085's other concerns remain out of scope.
How
COPILOT_ASSIGN_TOKENbefore label-triggered routing/comment/assignment; reject failed or malformed API responses and distinguish API acceptance from a verified session handoff.parseTeamMarkdown()to supported roster sections and cover the correctsquad healthcount.npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev) — not rechecked against the latest remote tip in this sessiongit diff --cached --stat)Build & Test
npm run buildpasses — blocked: SDK build reportstscis unavailable after dependency restore failed on package-feed 404snpm testpasses (all tests green) — full suite not run; focused suites belownpm run lintpasses (type check clean) — not run; dependencies unavailablenpm run lint:eslintpasses — not run; dependencies unavailableFocused results:
node node_modules\vitest\vitest.mjs run test\assignment-safety-attribution.test.ts test\recast-identity-neutrality.test.ts --reporter=dot— 108 passed.node node_modules\vitest\vitest.mjs run test\migration.test.ts test\crlf-normalization.test.ts test\parser-contracts.test.ts test\type-extensions.test.ts test\cli\health-command.test.ts --reporter=dot— 147 passed. The Ralph authority Vitest test could not run becausevitestwas unavailable after the package restore failed; direct Node assertions passed against all five synchronized reference files and verified that the regression conditions detect the pre-fix merge instructions.Changeset
npx changeset add/.changeset/*.md(ifpackages/squad-sdk/src/orpackages/squad-cli/src/changed)CHANGELOG.mdentry (maintainers only — write-protected for external contributors)skip-changeloglabel applied (if no user-facing changes)Docs
Exports
Breaking Changes
None.
Waivers
None requested; build/type/lint checks remain unverified due unavailable dependencies.